Skip to content

build(docker): upgrade Kubo from v0.34.0 to v0.40.0#321

Merged
FSM1 merged 1 commit into
mainfrom
chore/bump-kubo-v0.40
Mar 23, 2026
Merged

build(docker): upgrade Kubo from v0.34.0 to v0.40.0#321
FSM1 merged 1 commit into
mainfrom
chore/bump-kubo-v0.40

Conversation

@FSM1

@FSM1 FSM1 commented Mar 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • Upgrades IPFS Kubo from v0.34.0 to v0.40.0 in both local dev and staging compose files (6 minor versions)
  • Key improvements in the upgrade path:
    • v0.38+: Amino DHT Sweep provider — better content announcement without traffic spikes
    • v0.39: Self-hosting improvements for consumer hardware, automatic UPnP recovery
    • v0.40: IPNS over PubSub reliability fixes, persisted max sequence numbers surviving node restarts, IPNS record backup/restore without private key

Motivation

Staging IPNS operations through the someguy sidecar (v0.11.1) are completely non-functional — IPNS PUT/GET endpoints hang indefinitely, causing every delegated routing publish to timeout after 3 retries. While the API falls back to DB cache, this wastes resources and degrades publish latency. Kubo v0.40's IPNS improvements are expected to improve the overall routing reliability.

Test plan

  • Verified Kubo v0.40.0 running on local Docker host (AgentVersion: kubo/0.40.0)
  • SDK E2E: 83/83 passed against Kubo v0.40.0
  • Load tests: 5/5 scenarios passed, 0 errors across ~9,100 operations
    • Sustained Load: 3,892 ops, 0 errors
    • IPNS Publish Storm: 3,000 ops (20 clients), 0 errors
    • Spike Test: 1,800 ops (2→20 clients burst), 0 errors
    • Upload Throughput: 200 ops (49MB), 0 errors
    • Mixed Workload: 220 ops, 0 errors
  • Deploy to staging and verify IPNS resolve/publish performance

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Chores
    • Updated IPFS infrastructure service Docker image version to v0.40.0 across staging and production environments. This dependency update ensures improved system stability and maintains consistency in infrastructure configurations across all deployment setups.

@coderabbitai

coderabbitai Bot commented Mar 23, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 655727a2-4d41-40f3-9001-191d5a658721

📥 Commits

Reviewing files that changed from the base of the PR and between 260aa72 and 131189a.

📒 Files selected for processing (2)
  • docker/docker-compose.staging.yml
  • docker/docker-compose.yml
✅ Files skipped from review due to trivial changes (2)
  • docker/docker-compose.staging.yml
  • docker/docker-compose.yml

Walkthrough

Docker Compose files updated to use IPFS Kubo image version v0.40.0 instead of v0.34.0 in both staging and production configurations. No other service configuration changes applied.

Changes

Cohort / File(s) Summary
Docker Compose IPFS Version Update
docker/docker-compose.staging.yml, docker/docker-compose.yml
Updated IPFS Kubo service image tag from v0.34.0 to v0.40.0 in both files. All other service configurations (restart policy, environment variables, ports, volumes, healthchecks, resource limits) remain unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: upgrading IPFS Kubo from v0.34.0 to v0.40.0 in Docker configurations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/bump-kubo-v0.40

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@FSM1 FSM1 changed the title chore(docker): bump Kubo from v0.34.0 to v0.40.0 build(docker): upgrade Kubo from v0.34.0 to v0.40.0 Mar 23, 2026
Key improvements: Amino DHT Sweep provider (v0.38+), self-hosting
improvements (v0.39), IPNS over PubSub reliability fixes and persisted
sequence numbers (v0.40).

Verified locally: 83/83 SDK E2E tests pass, 5/5 load test scenarios
pass with 0 errors across ~9,100 operations.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 462a106bac8b
@FSM1 FSM1 force-pushed the chore/bump-kubo-v0.40 branch from 260aa72 to 131189a Compare March 23, 2026 00:21

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docker/docker-compose.staging.yml`:
- Line 63: The docker image was bumped to ipfs/kubo:v0.40.0 which introduces
breaking changes; either revert the image back to the last-known-good tag (e.g.,
replace image: ipfs/kubo:v0.40.0 with the previous tag) or, if you intend to
stay on v0.40.x, update the deployment and configuration to address the listed
changes: explicitly enable/implement gateway codec conversion for consumers (or
add manual conversion steps) to replace the removed automatic conversion, verify
clients that send both Accept and ?format= parameters to avoid conflicts with
the new ?format precedence, set the UnixFS profile to unixfs-v1-2025 for
deterministic CIDs where required, ensure the new /routing/v1 HTTP endpoint
exposure is acceptable (or reconfigure binding/firewall to disable it), and run
ipfs config post-migration checks (verify Provide.DHT sections) before promoting
to production.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a149aa71-0cd1-404e-8886-fb8537de6d6f

📥 Commits

Reviewing files that changed from the base of the PR and between 49886f6 and 260aa72.

📒 Files selected for processing (2)
  • docker/docker-compose.staging.yml
  • docker/docker-compose.yml

Comment thread docker/docker-compose.staging.yml
@FSM1 FSM1 merged commit c2590eb into main Mar 23, 2026
16 checks passed
@FSM1 FSM1 deleted the chore/bump-kubo-v0.40 branch March 23, 2026 00:28
FSM1 added a commit that referenced this pull request Mar 23, 2026
Parallelize independent CI jobs to reduce pipeline time:
- test: no longer waits for typecheck (builds packages itself)
- sdk-e2e: no longer waits for test (independent suite with own services)
- build: no longer waits for all checks (compilation check only)

Before: changes → typecheck → test → sdk-e2e → build (sequential)
After:  changes → lint → {test, sdk-e2e, build} (parallel)

Also bumps Kubo v0.34.0 → v0.40.0 in ci.yml, e2e.yml, and load-test.yml
service containers to match docker-compose (PR #321).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: d1f8e21dba94
FSM1 added a commit that referenced this pull request Mar 23, 2026
…324)

* chore(ci): parallelize CI jobs and bump Kubo to v0.40.0 in all workflows

Parallelize independent CI jobs to reduce pipeline time:
- test: no longer waits for typecheck (builds packages itself)
- sdk-e2e: no longer waits for test (independent suite with own services)
- build: no longer waits for all checks (compilation check only)

Before: changes → typecheck → test → sdk-e2e → build (sequential)
After:  changes → lint → {test, sdk-e2e, build} (parallel)

Also bumps Kubo v0.34.0 → v0.40.0 in ci.yml, e2e.yml, and load-test.yml
service containers to match docker-compose (PR #321).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: d1f8e21dba94

* chore(ci): add lint to all job needs, simplify if conditions

Address PR review:
- Add lint to typecheck/api-spec/migration-check needs for fail-fast
- Remove redundant !failure() && !cancelled() conditions now that
  jobs only depend on changes + lint

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: fbaacaeafccc

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
FSM1 added a commit that referenced this pull request Mar 23, 2026
…324)

* chore(ci): parallelize CI jobs and bump Kubo to v0.40.0 in all workflows

Parallelize independent CI jobs to reduce pipeline time:
- test: no longer waits for typecheck (builds packages itself)
- sdk-e2e: no longer waits for test (independent suite with own services)
- build: no longer waits for all checks (compilation check only)

Before: changes → typecheck → test → sdk-e2e → build (sequential)
After:  changes → lint → {test, sdk-e2e, build} (parallel)

Also bumps Kubo v0.34.0 → v0.40.0 in ci.yml, e2e.yml, and load-test.yml
service containers to match docker-compose (PR #321).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: d1f8e21dba94

* chore(ci): add lint to all job needs, simplify if conditions

Address PR review:
- Add lint to typecheck/api-spec/migration-check needs for fail-fast
- Remove redundant !failure() && !cancelled() conditions now that
  jobs only depend on changes + lint

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: fbaacaeafccc

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
FSM1 added a commit that referenced this pull request Mar 23, 2026
* docs: start work on todo - Investigate someguy IPNS routing failure locally

Entire-Checkpoint: e2afefc2dcf0

* chore(docker): add someguy sidecar with corrected config for local IPNS testing

Previous staging deployment failed because: no libp2p port exposed (4004),
standard DHT mode instead of accelerated, and resource limits too tight.
This config fixes all three: exposes 4004 for DHT participation, uses
accelerated mode (default), and gives 2GB RAM / 1 CPU with 1GB libp2p memory.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 1743c748c3e8

* chore(ci): parallelize CI jobs and bump Kubo to v0.40.0 in workflows (#324)

* chore(ci): parallelize CI jobs and bump Kubo to v0.40.0 in all workflows

Parallelize independent CI jobs to reduce pipeline time:
- test: no longer waits for typecheck (builds packages itself)
- sdk-e2e: no longer waits for test (independent suite with own services)
- build: no longer waits for all checks (compilation check only)

Before: changes → typecheck → test → sdk-e2e → build (sequential)
After:  changes → lint → {test, sdk-e2e, build} (parallel)

Also bumps Kubo v0.34.0 → v0.40.0 in ci.yml, e2e.yml, and load-test.yml
service containers to match docker-compose (PR #321).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: d1f8e21dba94

* chore(ci): add lint to all job needs, simplify if conditions

Address PR review:
- Add lint to typecheck/api-spec/migration-check needs for fail-fast
- Remove redundant !failure() && !cancelled() conditions now that
  jobs only depend on changes + lint

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: fbaacaeafccc

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(docker): restore someguy sidecar with corrected config for staging

Root cause of the Phase 19 someguy failure was threefold:
1. No libp2p port (4004) exposed — DHT couldn't receive inbound connections
2. DHT mode set to 'standard' instead of 'accelerated' (default)
3. Resource limits too tight (0.5 CPU, 768MB RAM, 512MB libp2p memory)

Fix: expose port 4004 (TCP+UDP), use accelerated DHT mode, allocate
2GB RAM / 1 CPU / 1GB libp2p memory, and increase start period to 60s.

Verified locally: someguy IPNS GET resolves in ~0.5s, PUT in ~0.1s,
and all 83 SDK E2E tests pass with someguy as the routing backend.

Also restores someguy Prometheus metrics scraping in Alloy config
and updates deploy-staging workflow to use http://someguy:8190.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 58b1c8d9fd40

* docs: add learnings entry for vitest env var loading gotcha

Vitest does not auto-load .env files into process.env — env vars
must be passed explicitly on the command line or via dotenv setup.
This caused spurious 429 failures during someguy testing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 8a5fc5b5e16a

* feat(api): add delegated routing fallback with Prometheus metrics

When the primary routing backend (someguy) fails after all retries,
the DelegatedRoutingClient now falls back to a configurable secondary
URL (DELEGATED_ROUTING_FALLBACK_URL). For staging, this is
delegated-ipfs.dev as a safety net.

New Prometheus metrics:
- cipherbox_delegated_routing_requests_total{operation,backend,outcome}
  tracks every routing request with primary/fallback backend label
- cipherbox_delegated_routing_fallbacks_total{operation}
  counts how often the primary fails and fallback is triggered

These enable Grafana alerting on frequent fallback usage, which would
indicate someguy health issues.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: a6f0bc4244a3

* fix(docker): use curl instead of wget for someguy healthcheck

The ghcr.io/ipfs/someguy image includes curl but not wget, so the
wget-based healthcheck would fail inside the container.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: ed489ad9746f

* fix(api): constrain backend param to 'primary' | 'fallback' union type

Prevents invalid Prometheus label values from being emitted.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: b7c371d3f753

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant